Rename nested object keys with q counter variable